package com.wyhello.tube4.spring.model;

import java.util.List;

import com.wyhello.tube4.facade.TubeFacade;
import com.wyhello.tube4.pojo.Bag;

public class BagRecordsModel {
	private TubeFacade facade;

	public TubeFacade getFacade() {
		return facade;
	}

	public void setFacade(TubeFacade facade) {
		this.facade = facade;
	}
	/**
	 * 新建包
	 * @param bag
	 * @return
	 */
	public boolean saveBag(Bag bag){
		return facade.saveBag(bag);
	}
	
	/**
	 * 对包信息进行修改
	 * @param bag
	 * @return
	 */
	public boolean updateBag(Bag bag){
		return facade.updateBag(bag);
	}
	/**
	 * 删除包
	 * @return
	 */
	public int deleteBag(String ids){
		return facade.deleteBag(ids);
	}
	/**
	 * 查询所有包
	 * @return
	 */
	public List<Bag> queryBag(int resideId){
		return facade.queryBag(resideId);
	}
	/**
	 * 根据ID查询包
	 * @param 包ID
	 * @return
	 */
	public Bag getBagById(int id){
		return facade.getBagById(id);
	}
	/**
	 * 查询最大ID值
	 * @param positionId 
	 * @return 
	 */
	public int queryBagMaxId(int resideId){
		return facade.queryBagMaxId(resideId);
	}
}
